Also in automobiles, in order to meet the demand for space-saving, improving assemblability, improving controllability, and the like, there is a trend that a mechanical driving system is replaced by a system which is electrically driven by a motor. As an example of the system, there is an automatic transmission for vehicle in which a range-changing mechanism is driven by a motor as described in JP 2004-23932 A. On this range-changing mechanism, there is mounted an encoder which outputs a pulse signal every predetermined angles in synchronism with rotation of a motor, and energization phases of the motor are sequentially changed based on a count value of the output signal of the encoder so that the motor is rotationally driven to a target position.
In a system as described above, in order to learn a reference position for controlling a rotational position of the motor, a butting control is performed in which the motor is rotated until butting to a limit position (for example, a wall) of a movable range of the range-changing mechanism. Thus, the reference position is learned.
However, if a motor torque is made larger and the rotation speed is made higher at the time of the butting control, an amount of deformation (for example, deflection amount) of a component becomes large when a part of a component is butted against the limit position of the movable range of the range-changing mechanism, so that the learning accuracy of the reference position may be deteriorated.
JP 2004-23932 A describes a method in which the motor torque and the rotation speed are reduced at the time of the butting control. This method makes it possible to reduce the deformation amount of the component at the time of butting the limit position of the movable range of the range-changing mechanism.
However, if the motor torque and the rotation speed are reduced in a period from a start to an end of the butting control, it takes a longer time from the start of the butting control to the butting against the limit position, and an execution period (time from the start to the end of the butting control) of the butting control is thus increased. In particular, at a low temperature, a viscosity of lubricant on a movable part of the range-changing mechanism is higher, and the friction resistance is accordingly higher. Therefore, if the motor torque is small, the rotation speed is accordingly lower, whereby the execution period of the butting control can be considerably long.